﻿#region zh-CHS 2006 - 2008 DemoSoft 团队 | en 2006 - 2008 DemoSoft Team

//     NOTES
// ---------------
//
// This file is a part of the MMOSE(Massively Multiplayer Online Server Engine) for .NET.
//
//                              2006-2008 DemoSoft Team
//
//
// First Version : by H.Q.Cai - mailto:caihuanqing@hotmail.com

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published
 *   by the Free Software Foundation; either version 2.1 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

#region zh-CHS 包含名字空间 | en Include namespace
using System;
using System.Threading;
using Demo.Mmose.Core.Entity.Creature;
using Demo.Mmose.Core.Util;
#endregion

namespace Demo.Mmose.Core.Entity.Item
{
    /// <summary>
    /// BaseItem Delta
    /// </summary>
    public class BaseItemState
    {
        #region zh-CHS 共有属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateName = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateName
        {
            get { return m_UpdateName; }
            internal set { m_UpdateName = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateItemTemplate = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateItemTemplate
        {
            get { return m_UpdateItemTemplate; }
            internal set { m_UpdateItemTemplate = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateOwner = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateOwner
        {
            get { return m_UpdateOwner; }
            internal set { m_UpdateOwner = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateParent = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateParent
        {
            get { return m_UpdateParent; }
            internal set { m_UpdateParent = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateAddChildItemCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateAddChildItemCall
        {
            get { return m_UpdateAddChildItemCall; }
            internal set { m_UpdateAddChildItemCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateRemoveChildItemCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateRemoveChildItemCall
        {
            get { return m_UpdateRemoveChildItemCall; }
            internal set { m_UpdateRemoveChildItemCall = value; }
        }

        #endregion

        #region zh-CHS 内部方法 | en Internal Methods
        /// <summary>
        /// 
        /// </summary>
        internal void RestoreAll()
        {
            m_UpdateName = false;
            m_UpdateItemTemplate = false;
            m_UpdateOwner = false;
            m_UpdateParent = false;
            m_UpdateAddChildItemCall = false;
            m_UpdateRemoveChildItemCall = false;
        }
        #endregion

        #region zh-CHS 内部的事件处理函数 | en Internal Event Handlers

        #region zh-CHS Name事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateName( string strName, BaseItem baseItem )
        {
            EventHandler<BeforeUpdateNameEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateName;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateNameEventArgs eventArgs = new BeforeUpdateNameEventArgs( strName, baseItem );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateName( string strName, BaseItem baseItem )
        {
            EventHandler<AfterUpdateNameEventArgs> tempAfterEventArgs = m_EventAfterUpdateName;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateNameEventArgs eventArgs = new AfterUpdateNameEventArgs( strName, baseItem );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS ItemTemplate事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateItemTemplate( BaseItemTemplate itemTemplate, BaseItem item )
        {
            EventHandler<BeforeUpdateItemTemplateEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateItemTemplate;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateItemTemplateEventArgs eventArgs = new BeforeUpdateItemTemplateEventArgs( itemTemplate, item );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateItemTemplate( BaseItemTemplate itemTemplate, BaseItem item )
        {
            EventHandler<AfterUpdateItemTemplateEventArgs> tempAfterEventArgs = m_EventAfterUpdateItemTemplate;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateItemTemplateEventArgs eventArgs = new AfterUpdateItemTemplateEventArgs( itemTemplate, item );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS Owner事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateOwner( BaseCreature ownerCreature, BaseItem item )
        {
            EventHandler<BeforeUpdateOwnerEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateOwner;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateOwnerEventArgs eventArgs = new BeforeUpdateOwnerEventArgs( ownerCreature, item );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateOwner( BaseCreature ownerCreature, BaseItem item )
        {
            EventHandler<AfterUpdateOwnerEventArgs> tempAfterEventArgs = m_EventAfterUpdateOwner;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateOwnerEventArgs eventArgs = new AfterUpdateOwnerEventArgs( ownerCreature, item );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS Parent事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateParent( BaseItem parentItem, BaseItem item )
        {
            EventHandler<BeforeUpdateParentEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateParent;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateParentEventArgs eventArgs = new BeforeUpdateParentEventArgs( parentItem, item );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateParent( BaseItem parentItem, BaseItem item )
        {
            EventHandler<AfterUpdateParentEventArgs> tempAfterEventArgs = m_EventAfterUpdateParent;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateParentEventArgs eventArgs = new AfterUpdateParentEventArgs( parentItem, item );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS AddChildItemCall事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeAddChildItem( BaseItem addChildItem, BaseItem item )
        {
            EventHandler<BeforeAddChildItemCallEventArgs> tempBeforeEventArgs = m_EventBeforeAddChildItem;
            if ( tempBeforeEventArgs != null )
            {
                BeforeAddChildItemCallEventArgs eventArgs = new BeforeAddChildItemCallEventArgs( addChildItem, item );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterAddChildItem( BaseItem addChildItem, BaseItem item )
        {
            EventHandler<AfterAddChildItemCallEventArgs> tempAfterEventArgs = m_EventAfterAddChildItem;
            if ( tempAfterEventArgs != null )
            {
                AfterAddChildItemCallEventArgs eventArgs = new AfterAddChildItemCallEventArgs( addChildItem, item );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS RemoveChildItemCall事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeRemoveChildItem( BaseItem removeChildItem, BaseItem item )
        {
            EventHandler<BeforeRemoveChildItemCallEventArgs> tempBeforeEventArgs = m_EventBeforeRemoveChildItem;
            if ( tempBeforeEventArgs != null )
            {
                BeforeRemoveChildItemCallEventArgs eventArgs = new BeforeRemoveChildItemCallEventArgs( removeChildItem, item );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterRemoveChildItem( BaseItem removeChildItem, BaseItem item )
        {
            EventHandler<AfterRemoveChildItemCallEventArgs> tempAfterEventArgs = m_EventAfterRemoveChildItem;
            if ( tempAfterEventArgs != null )
            {
                AfterRemoveChildItemCallEventArgs eventArgs = new AfterRemoveChildItemCallEventArgs( removeChildItem, item );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #endregion

        #region zh-CHS 共有事件 | en Public Event

        #region zh-CHS Name事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateNameEventArgs> m_EventBeforeUpdateName;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateName = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateNameEventArgs> BeforeUpdateName
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateName );
                {
                    m_EventBeforeUpdateName += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateName );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateName );
                {
                    m_EventBeforeUpdateName -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateName );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateNameEventArgs> m_EventAfterUpdateName;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateName = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateNameEventArgs> AfterUpdateName
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateName );
                {
                    m_EventAfterUpdateName += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateName );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateName );
                {
                    m_EventAfterUpdateName -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateName );
            }
        }
        #endregion

        #region zh-CHS ItemTemplate事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateItemTemplateEventArgs> m_EventBeforeUpdateItemTemplate;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateItemTemplate = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateItemTemplateEventArgs> BeforeUpdateItemTemplate
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateItemTemplate );
                {
                    m_EventBeforeUpdateItemTemplate += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateItemTemplate );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateItemTemplate );
                {
                    m_EventBeforeUpdateItemTemplate -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateItemTemplate );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateItemTemplateEventArgs> m_EventAfterUpdateItemTemplate;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateItemTemplate = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateItemTemplateEventArgs> AfterUpdateItemTemplate
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateItemTemplate );
                {
                    m_EventAfterUpdateItemTemplate += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateItemTemplate );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateItemTemplate );
                {
                    m_EventAfterUpdateItemTemplate -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateItemTemplate );
            }
        }
        #endregion

        #region zh-CHS Owner事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateOwnerEventArgs> m_EventBeforeUpdateOwner;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateOwner = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateOwnerEventArgs> BeforeUpdateOwner
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateOwner );
                {
                    m_EventBeforeUpdateOwner += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateOwner );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateOwner );
                {
                    m_EventBeforeUpdateOwner -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateOwner );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateOwnerEventArgs> m_EventAfterUpdateOwner;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateOwner = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateOwnerEventArgs> AfterUpdateOwner
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateOwner );
                {
                    m_EventAfterUpdateOwner += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateOwner );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateOwner );
                {
                    m_EventAfterUpdateOwner -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateOwner );
            }
        }
        #endregion

        #region zh-CHS Parent事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateParentEventArgs> m_EventBeforeUpdateParent;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateParent = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateParentEventArgs> BeforeUpdateParent
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateParent );
                {
                    m_EventBeforeUpdateParent += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateParent );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateParent );
                {
                    m_EventBeforeUpdateParent -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateParent );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateParentEventArgs> m_EventAfterUpdateParent;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateParent = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateParentEventArgs> AfterUpdateParent
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateParent );
                {
                    m_EventAfterUpdateParent += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateParent );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateParent );
                {
                    m_EventAfterUpdateParent -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateParent );
            }
        }
        #endregion

        #region zh-CHS AddChildItem事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeAddChildItemCallEventArgs> m_EventBeforeAddChildItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeAddChildItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeAddChildItemCallEventArgs> BeforeAddChildItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddChildItem );
                {
                    m_EventBeforeAddChildItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddChildItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddChildItem );
                {
                    m_EventBeforeAddChildItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddChildItem );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterAddChildItemCallEventArgs> m_EventAfterAddChildItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterAddChildItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterAddChildItemCallEventArgs> AfterAddChildItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddChildItem );
                {
                    m_EventAfterAddChildItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddChildItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddChildItem );
                {
                    m_EventAfterAddChildItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddChildItem );
            }
        }
        #endregion

        #region zh-CHS RemoveChildItem事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeRemoveChildItemCallEventArgs> m_EventBeforeRemoveChildItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeRemoveChildItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeRemoveChildItemCallEventArgs> BeforeRemoveChildItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveChildItem );
                {
                    m_EventBeforeRemoveChildItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveChildItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveChildItem );
                {
                    m_EventBeforeRemoveChildItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveChildItem );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterRemoveChildItemCallEventArgs> m_EventAfterRemoveChildItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterRemoveChildItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterRemoveChildItemCallEventArgs> AfterRemoveChildItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveChildItem );
                {
                    m_EventAfterRemoveChildItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveChildItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveChildItem );
                {
                    m_EventAfterRemoveChildItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveChildItem );
            }
        }
        #endregion

        #endregion

    }
}
#endregion

